package session1.test.ioTest;

import java.io.*;

public class Output {
	public static void main(String[] args) {
		try{
			Coo coo = new Coo(550);
			File file = new File("test.txt");
			FileOutputStream fileOutputStream=new FileOutputStream(file);
			ObjectOutputStream outputStream = new ObjectOutputStream(fileOutputStream);
			outputStream.writeObject(coo);
		}
		catch (Throwable t){
			System.out.println(t.getMessage());
		}
	}
}
class Coo implements Serializable{
	int x;
	int y;
	public Coo(){
		this(0);
	}
	public Coo(int x){
		this(x,x);
	}
	public Coo(int x, int y) {
		this.x = x;
		this.y = y;
	}
}